package controller

import "github.com/gin-gonic/gin"
import (
	"app/api/sys/service"
	"net/http"
	"app/common"
)
//登录
func DoLogin(c *gin.Context) {
	//angularjs数据传入
	val, _:= c.Get("jsonData")
	reqData :=val.(common.ReqJsonData)
	userName := reqData.GetDefaultString("userName","")
	passWord := reqData.GetDefaultString("passWord","")
	res, msg, data := service.DoLogin(userName, passWord)
	c.JSON(http.StatusOK, gin.H{"res":res, "msg":msg, "data":data})
}
